﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpenseSystem.Model;
using ExpenseSystem.Core.Authority;
using ExpenseSystem.Common;
using ExpenseSystem.Common.BaseModel;


namespace ExpenseSystem.Core.DataAddOn
{
    public class NormalSetSite<T> : IAddable<T> where T : NormalModel, new()
    {
        public void Add(T data)
        {
            UserProfile profile = Authority.Authority.GetUserProfile();
            if (data != null&&profile!=null)
                data.Site = profile.SiteId;
        }
    }
}
